cmake_minimum_required(VERSION 3.5)                             

project(AutoAim)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -std=c++11")

set(CMAKE_BUILD_TYPE Debug)

find_package(OpenCV 3.4.7 REQUIRED)

include_directories(/usr/include/Eigen)

include_directories(${OpenCV_INCLUDE_DIRS} ./serial)
add_executable(AutoAim main.cpp)
target_link_libraries(AutoAim ${OpenCV_LIBS})

include_directories(camera)
add_subdirectory(camera)
target_link_libraries(AutoAim camera)

include_directories(autoaim/armor autoaim/detector autoaim/computor autoaim/data_pack)
add_subdirectory(autoaim)
target_link_libraries(AutoAim autoaim)

include_directories(assert/Timer)
add_subdirectory(assert)
target_link_libraries(AutoAim timer)

include_directories(serial)
add_subdirectory(serial)
target_link_libraries(AutoAim serial)

target_link_libraries(AutoAim pthread dl)
